% This file creates and saves Figure 7a in 
% Replication_files\Figures\Figure7a.eps
clear all

    cd ../mat_files

load fig8a_irfs_w_inertia_rev.mat

y_e_i=y_e;
c_e_i=c_e;
dy_e_i=dy_e;
q_e_i=q_e;
mu_e_i=mu_e;

load fig8a_irfs_wo_inertia_rev.mat

fig8=figure;

%output response

irf_y=subplot(2,3,1);
hold on
plot(1:20,y_e_i,'k','LineWidth',1);
plot(1:20,y_e,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_y,'\fontsize{10}Output (Y)','fontweight','normal');
box(irf_y,'on');

%consumption response

irf_c=subplot(2,3,2);
hold on
plot(1:20,c_e_i,'k','LineWidth',1);
plot(1:20,c_e,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_c,'\fontsize{10}Consumption (C)','fontweight','normal')
box(irf_c,'on');

%technology response

irf_z=subplot(2,3,3);
hold on
plot(1:20,z_a_e,'k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_z,'\fontsize{10}Technology (Z^a)','fontweight','normal')
box(irf_z,'on');

%output growth response

irf_dy=subplot(2,3,4);
hold on
plot(1:20,dy_e_i,'k','LineWidth',1);
plot(1:20,dy_e,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
%ylim([-0.08 0.12]);
title(irf_dy,'\fontsize{10}Output Growth (\DeltaY)','fontweight','normal')
box(irf_dy,'on');

%discount rate response

irf_q=subplot(2,3,5);
hold on
plot(1:20,q_e_i,'k','LineWidth',1);
plot(1:20,q_e,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
%ylim([-0.12 0.18]);
title(irf_q,'\fontsize{10}Discount Rate (q)','fontweight','normal')
box(irf_q,'on');

%markup response

irf_mu=subplot(2,3,6);
hold on
plot(1:20,mu_e_i,'k','LineWidth',1);
plot(1:20,mu_e,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
%ylim([-0.04 0.06]);
title(irf_mu,'\fontsize{10}Markup (\mu)','fontweight','normal')
box(irf_mu,'on');

fig8.PaperUnits='inches';
fig8.PaperPosition=[0 0 7.5 3];

cd ../Figures
print('Figure_8a','-depsc','-tiff')

clear 
cd ../m_files